package com.chuantou.yuba.api.to;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;

import com.google.gson.annotations.SerializedName;

public class CityListTO extends BaseTO {
	@SerializedName("data")
	private List<CityTO> cities;

	public CityListTO() {
	}

	public CityListTO(Parcel source) {
		super(source);
		this.cities = new ArrayList<CityTO>();
		source.readTypedList(this.cities, CityTO.CREATOR);
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		super.writeToParcel(dest, flags);
		dest.writeTypedList(this.cities);
	}

	public static final Creator<CityListTO> CREATOR = new Creator<CityListTO>() {

		@Override
		public CityListTO createFromParcel(Parcel source) {
			return new CityListTO(source);
		}

		@Override
		public CityListTO[] newArray(int size) {
			return new CityListTO[size];
		}
	};

	public List<CityTO> getCities() {
		return cities;
	}

	public void setCities(List<CityTO> cities) {
		this.cities = cities;
	}

}
